package com.woniu.product.controller;


import com.woniu.core.util.Result;
import com.woniu.product.dto.TUserCourseDto;
import com.woniu.product.model.TUserCourse;
import com.woniu.product.service.TUserCourseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 吴彦祖
 * @since 2024年04月02日
 */
@RestController
@RequestMapping("/tUserCourse")
@Api(tags = "用户课程详情表相关接口")
public class TUserCourseController {

    @Resource
    private TUserCourseService tUserCourseService;
    @GetMapping("/queryMyStudent.coach/{coachId}")
    @ApiOperation("教练根据coach_id查询自己的学员")
    public Result<List<TUserCourseDto>> queryMyStudent(@PathVariable("coachId")Integer coachId) throws Exception{
        List<TUserCourseDto> list=tUserCourseService.queryMyStudent(coachId);
        int i = 0;int k = 3;
        System.out.println(1);
        return Result.getListResult(TUserCourseDto.class).setMsg("教练根据coach_id查询自己的学员成功").setData(list);
    }

}

